﻿#region

using System.Linq;
using System.Web.Mvc;
using BTL.OnlineTestingSocial.Application.Facade;

#endregion

namespace BTL.OnlineTestingSocial.Application.Web.Controllers
{
    public class AccountController : Controller
    {
        private readonly IOnlineTestingEngineFacade _onlineTestingFacade;

        public AccountController()
            : this(DependencyResolver.Current.GetService<IOnlineTestingEngineFacade>())
        {
        }

        public AccountController(IOnlineTestingEngineFacade onlineTestingFacade)
        {
            _onlineTestingFacade = onlineTestingFacade;
        }

        public ActionResult Index()
        {
            var categories = _onlineTestingFacade.GetCategories().ToList();
            return View();
        }
    }
}